<template>
  <view class="nav">
    <view></view>
    <view class="navbar"></view>
  </view>
</template>

<script setup>
import {onBeforeMount, ref} from 'vue'

onBeforeMount(() => {
  setNavSize()
})
//状态栏高度
const status = ref(0)
const navHeight = ref(0)
// 获取状态栏高度
const setNavSize = () => {
  const {system, statusBarHeight} = uni.getSystemInfoSync()
  status.value = statusBarHeight * 2
  const isiOs = system.indexOf('iOS') > -1
  if (isiOs) {
    navHeight.value = 96
  } else {
    navHeight.value = 88
  }
}

</script>


<style lang="scss">
.nav {
  position: fixed;
}
</style>
